package game.views;

import game.worlds.GameWorld;
import hx.display.UILoadScene;

/**
 * 暂停界面
 */
@:build(hx.macro.UIBuilder.build("assets/views/PauseView.xml"))
class PauseView extends UILoadScene {
	override function onLoaded() {
		super.onLoaded();
		this.close.clickEvent = () -> {
			this.releaseScene();
		}
		this.backGame.onOk = () -> {
			this.releaseScene();
		}
		this.czb.onOk = () -> {
			this.releaseScene();
			var fightState:FightStateView = cast GameWorld.currentWorld.state;
			var view = new SkillDescView(fightState.p1.role.roleData, fightState.p2.role.roleData);
			view.topView.addChild(view);
		}
	}
}
